#ifndef TWOTHOUSANDFORTYEIGHT_H
#define TWOTHOUSANDFORTYEIGHT_H

#include <QMainWindow>
#include <QPushButton>
#include <QTime>
#include <QMessageBox>
#include <QKeyEvent>
#include <QPainter>
QT_BEGIN_NAMESPACE
namespace Ui { class TwoThousandFortyEight; }
QT_END_NAMESPACE

class TwoThousandFortyEight : public QMainWindow
{
    Q_OBJECT

public:
    TwoThousandFortyEight(QWidget *parent = nullptr);
    ~TwoThousandFortyEight();
    void paintEvent(QPaintEvent *);
    void keyPressEvent(QKeyEvent *event);
    void Init();

    //上下左右操作函数
    void PressUp();
    void PressDown();
    void PressLeft();
    void PressRight();
    void myRand();


    QPushButton *button;
    int s[4][4];
    int score;
    bool state;
    struct Ns
    {
        int i;
        int j;
    };
public slots:
    void slotStart();
private:
    Ui::TwoThousandFortyEight *ui;
};
#endif // TWOTHOUSANDFORTYEIGHT_H
